mui.init({
	swipeBack: false
});
App.init();
var contentVm = new Vue({
	el: '#content',
	data: {
		cabinetInfo: {},
		cabinetLendingList: [],
		androidSupporterCount: 0,
		iosSupporterCount: 0,
		typeCSupporterCount: 0
	},
	watch: {
		cabinetLendingList: function(newVal, oldVal) {
			var that = this;
			for(var i = 0; i < newVal.length; i++) {
				switch(newVal[i].support) {
					case '1':
						that.androidSupporterCount += 1
						break;
					case '2':
						that.iosSupporterCount += 1
						break;
					case '3':
						that.typeCSupporterCount += 1
						break;
					default:
						break;
				}
			}
		}
	},
	mounted: function() {
		var that = this;
		if(window.plus) {
			that.plusReady();
		} else {
			document.addEventListener('plusready', that.plusReady, false);
		}

	},
	methods: {
		plusReady: function() {
			var that = this;
			var currentWebview = plus.webview.currentWebview();
			that.cabinetInfo = currentWebview.cabinet.cabinetInfo;
			that.cabinetLendingList = currentWebview.cabinet.cabinetLendingList;
		},

	}
})